import request from '@/utils/request'

// 查询课程列列表
export function listYkecheng(query) {
  return request({
    url: '/hatha/ykecheng/list',
    method: 'get',
    params: query
  })
}

// 查询课程列详细
export function getYkecheng(id) {
  return request({
    url: '/hatha/ykecheng/' + id,
    method: 'get'
  })
}

// 取消预约
export function quxiaoYkecheng(id) {
  return request({
    url: '/hatha/ykecheng/quxiao/' + id,
    method: 'get'
  })
}

export function yyinfo(id) {
  return request({
    url: '/hatha/ykecheng/yyinfo/' + id,
    method: 'get'
  })
}

// 新增课程列
export function addYkecheng(data) {
  return request({
    url: '/hatha/ykecheng',
    method: 'post',
    data: data
  })
}

// 修改课程列
export function updateYkecheng(data) {
  return request({
    url: '/hatha/ykecheng',
    method: 'put',
    data: data
  })
}

// 删除课程列
export function delYkecheng(id) {
  return request({
    url: '/hatha/ykecheng/' + id,
    method: 'delete'
  })
}
